<link rel="stylesheet" href="/public/themes/second/css/navigationTab.css" type="text/css">

<?$tour = $this->viewParams['tour'];?>
<? $meta = unserialize($tour['metadata']);
   $poster_name = $meta['poster_name'];
?> 
<?
	$sess = new Zend_Session_Namespace(CLU_NS);
?>
<? if (strpos($sess->userPermissions, 'update tour')) :?>
<div style="background-color:#eee;text-align:right">
<a href="<?=$this->hvnUrl(array('module' => 'tour', 'action' => 'edit'))?>?id=<?=$tour['id']?>"><?=t(135)?></a>
| 
	<? $languages =  Zend_Registry::get('configuration')->languages;?>
	<?=t(90)?>: 
	<? foreach ($languages as $k=>$v) :?>
        <? if ($k != $tour['article']['article_language']) :?> 
    		<a style="text-decoration:none" href="<?=$this->hvnUrl(array('module' => 'article', 'action' => 'translate'))?>?id=<?=$tour['article']['article_id']?>&to=<?=$k?>"><?=substr(strstr($v,'_'),1)?></a>,
    	<?endif?>
    <?endforeach?>
    
</div>
<?endif ?>

<h1> <?= $tour['article']['article_title'] ?></h1>

<div style="border: 1px solid #C6C8C7; background: #BCECF6; padding-left:5px;">
    <div style="float:left; width:310px; text-align:center;"><span class="db-keyword">Inbound</span> </div>
	<div style="float:left; border-left: 1px solid #C6C8C7; padding-left:5px; ">
		<span class="db-keyword"><?=t(846)?></span>
	</div>
	<div style="clear:both"></div>
</div>

<div style="border: 1px solid #C6C8C7;  background: #EEFEFE;">
	<div style="float:left; border-right: 1px solid #C6C8C7 ;width:310px; padding-left:5px;" >
		<span class="db-keyword"><?=t(822) ?></span>: <?=$tour['itinery'] ?>
		<br/>
		<span class="db-keyword"><?=t(811) ?></span> :<?=$tour['price'] ?> <?=$tour['price_currency'] ?>   
		<br/>
		<span class="db-keyword"><?=t(819) ?></span>: <?=$tour['total_duration']?> <?=t(826) ?> 
		<!--
		<br/>
		<span class="db-keyword"><?=t(816) ?></span>: <?=$tour['category'] ?>
		-->
	</div>
	<div style="width: 310px;float:left; border-left: 1px solid #C6C8C7 ;padding-left:10px">
		<?=$tour['organizer_contact'];?>
		<?=t(823) ?>
		<?if (empty($tour->organizer_website)) :?>
		<?=$tour['organizer_name'] ?>
		<?else:?>
		<a href="<?=$tour['organizer_website'] ?>"> <?=$tour['organizer_name'] ?> </a>
		<?endif ?>
	</div>
	<div style="clear:both"></div>
</div>

<br/>
<!--</?=t(21) ?>:-->
<span style="text-align: justify">
	<?=$tour['article']['article_body'] ?>
</span>
<br/>

<b> <?=t(828) ?> </b>
<br/>

<?if (count ($tour['legs']) > 0) :?>

<div class="box_detail_tours">
   <div class="box_detail_tours_title">Chi tiet Tours</div>
   <div class="clear"></div>
   <div class="box_detail_tours_name"><?= $tour['article']['article_title'] ?></div>
   <div class="box_detail_tours_time">khoi hanh thu 6 hang tuan</div>
</div>
<? foreach ($tour['legs'] as $leg_num => $leg) :?>
<?$meta = unserialize($leg['leg']['metadata'])?>
       <div class="box_view_tours_list">
            <div class="box_view_tours_list_img">
            	<span class="left-category-tour-gallery" style="float:left;">
		    		<img src="" class="active-image" align="absmiddle" style="padding:0px 10px 2px 0px;"/>
                 	<span style="display:none" class="image-list"> 
    			    <?=$this->hvnSlideshow(array('userId' => $tour['poster_id'], 
			    						'contentType' => "tour",
			    						'contentId' => $tour['id'], 'size' => 'xsmall'
    			    )) ?>
    			    </span>
                </span> 
            </div>    
           <div class="box_view_tours_list_title" style="padding-left:50px;"><a href="#"><?=$this->viewParams['aTlegData'][$leg_num - 1]['article_title'] ?></a></div>
           <div class="text"><?=$this->viewParams['aTlegData'][$leg_num - 1]['article_body'] ?>
           		<?if ($this->viewParams['edit_allowed']) :?>
		        <div style="text-align:right"> <a href="<?= $this->hvnUrl(array('module'=>'tour', 'action'=>'edit-tleg')) . '?id=' . $leg['leg']['id'] . '&tid=' . $tour['id']?>">
		        <?=t(38) ?></a>
	        	<? if (strpos($sess->userPermissions, 'update tour')) :?>
					| 
					<? $languages =  Zend_Registry::get('configuration')->languages;?>
					<?=t(90)?>:
						<? foreach ($languages as $k=>$v) :?>
					        <? if ($k != $this->viewParams['aTlegData'][$leg_num - 1]['article_language']) :?> 
					    		<a style="text-decoration:none" href="<?=$this->hvnUrl(array('module' => 'article', 'action' => 'translate'))?>?id=<?=$leg['article']['article_id']?>&to=<?=$k?>"><?=substr(strstr($v,'_'),1)?></a>,
					    	<?endif?>
					    <?endforeach?>
				</div>
				<?endif ?>
        	<?endif ?>    
           </div>
	   </div>
		<div class="clear"></div>
<?endforeach ?>
   <div class="text">
   <b>Chu y :</b>
   <br />
   </div>
<?endif ?>
<!--
<br/>
<?=t(825) ?>: <?=$tour['organizer_contact']?>
<?if ($this->viewParams['edit_allowed']) :?>
<span style="align:right"> <a href="<?=$this->hvnUrl(array('module'=>'tour', 'action'=>'edit')) . '?id=' .$tour['id'] ?>">
<?=t(38) ?></a>
</span>
<?endif ?>
-->
